<div id = "index-top">
  <div id = "index-jiaoshi">
      <h3><span>教师资源</span> <a href="/users" target="_blank">更多</a></h3>
      <ul>
          <% for js in @jiaoshis%>
              <li><a href="/users/show/<%=js.id%>" target="_blank" title="<%=js.real_name%>"><%=js.real_name%></a></li>
          <%end%>
          <% if @jiaoshis.length < 7 %>
            <% for i in 0..7- @jiaoshis.length %>
              <li><a >... </a></li>
            <%end%>
          <%end%>  
      </ul>

  </div>
  <div id = "index-top-right">
    <div id = "index-notes">
      <p>123123123sakslkfjalskjfdlkasdkjfals</p>
      <br>
           123kjklgklkldddddddddddddddkdlfgjskdljgsldfffffffffffffffffff
    </div>
    <div id = "index-gonggao">
        <h3><span>系统公告</span> <a href="/advers" target="_blank">更多</a></h3>
        <ul>
            <% if @advers.length >= 7 %>
              <% for i in 0..6 %>
                  <li><a href="/advers/show/<%=@advers[i].id%>" target="_blank" title="<%=@advers[i].title%>"><%=@advers[i].title%></a></li>
              <%end%>
            <% elsif @advers.length < 7 %>
              <% for ad in @advers%>
                  <li><a href="/advers/show/<%=ad.id%>" target="_blank" title="<%=ad.title%>"><%=ad.title%></a></li>
              <%end%>
              <% for i in 0..7-@advers.length %>
                <li><a >... </a></li>
              <%end%>
            <%end%>  
        </ul>
    </div>
</div>
</div>

<div id = "index-center">
    <div id = "index-kecheng">
      <h3><span>课程资源</span> <a href="/kechengs" target="_blank">更多</a></h3>
      <ul>
          <% for kc in @kechengs%>
              <li><a href="/kechengs/show/<%=kc.id%>" target="_blank" title="<%=kc.kcm%>"><%=kc.kcm%></a></li>
          <%end%>
          <% if @kechengs.length < 7 %>
            <% for i in 0..7- @kechengs.length %>
              <li><a >... </a></li>
            <%end%>
          <%end%>  
      </ul>

    </div>

    <div id = "index-zuoye">
      <h3><span>作业</span> <a href="/zuoyes" target="_blank">更多</a></h3>
      <ul>
          <% for zy in @zuoyes%>
              <li><a href="/zuoyes/show/<%=zy.id%>" target="_blank" title="<%=zy.zylx + zy.zymc%>"><%=zy.zylx + zy.zymc%></a></li>
          <%end%>
          <% if @zuoyes.length < 7 %>
            <% for i in 0..7- @zuoyes.length %>
              <li><a >... </a></li>
            <%end%>
          <%end%>  
      </ul>

    </div>

</div>

<div>
      <% form_for :login, @user, :url => { :action => "login" } do |f| %>

      <table>
              <tr>
                      <td><p>Username:</p></td>
                      <td><%= text_field_tag 'name' %></td>
              </tr>
              <tr>
                      <td><p>Password:</p></td>
                      <td><%= password_field_tag 'pass' %></td>
              </tr>
              <tr>
                      <td></td>
                      <td><%= submit_tag 'Login' %></td>
              </tr>
      </table>

      <%end%>
</div>